#ifndef __FUNC_IR_H__
#define __FUNC_IR_H__

typedef struct
{
  TIM_HandleTypeDef *ir_tim;
  uint32_t ir_ch;
  UART_HandleTypeDef* ir_uart;
  GPIO_TypeDef* pwm_gpio;
  uint16_t pwm_pin;
  GPIO_TypeDef* uart_gpio;
  uint16_t uart_pin;
}IRTaskParaTypeDef;

typedef struct
{
  uint8_t header;
  uint8_t devicetype;
  uint8_t devicenum;
  uint8_t event;
  uint8_t sum;
}IRDataType;

typedef struct
{
  uint8_t header;
  uint8_t type;
  uint8_t data1;
  uint8_t data2;
  uint8_t data3;
  uint8_t sum;
}IRConfigType;

enum IRFrameType
{
  IR_SHOOT = 0x00u
};

typedef struct
{
  enum IRFrameType type;
  uint8_t data;
}IRQueueDataType;


void ir_TaskFunction(void *pvParameters);
void ir_gpio_TaskFunction(void *pvParameters);
uint8_t ir_Calsendsum(IRDataType *data);
#endif